<template>
  <div>
    <Cell>
      提示：答题页面(论述题，选择题，到点自动提交)
      提交题后出分数和答案，仅限选择题
    </Cell>
    <EditForm :infos="infos" :colon="false" :border="true" @submit="submit"></EditForm>
  </div>
</template>

<script>
import EditForm from '@/components/EditForm/index'
import { Cell, CellGroup } from 'vant'
export default {
  name: 'paper',
  components: {
    Cell,
    CellGroup,
    EditForm
  },
  data () {
    return {
      infos: [
        {
          type: 'radio',
          rules: true,
          label: '',
          upTips: '1、中国的首都在哪里？',
          key: 'aa',
          list: [
            {value: '0', label: 'A.北京'},
            {value: '1', label: 'B.北京'},
            {value: '2', label: 'C.北京'},
            {value: '3', label: 'D.北京'}
          ]
        },
        {
          type: 'checkbox',
          upTips: '2、中国的首都在哪里？',
          rules: true,
          label: '',
          key: 'bb',
          list: [
            {value: '0', label: 'A.北京'},
            {value: '1', label: 'B.北京'},
            {value: '2', label: 'C.北京'},
            {value: '3', label: 'D.北京'}
          ],
          value: []
        },
        {
          type: 'textarea',
          upTips: '3、中国的首都在哪里？（简答题）',
          rules: true,
          label: '',
          key: 'cc',
          value: ''
        }
      ]
    }
  },
  methods: {
    submit (v) {
      this.$router.replace({
        path: '/paperResult',
        query: {info: v}
      })
    }
  }
}
</script>

<style lang="" scoped>
</style>
